package  utils
{
	import flash.display.Sprite;
	/**
	 * ...
	 * @author FireKnight
	 */
	public class DrawRect 
	{
		
		public function DrawRect() 
		{
			
		}
		
		/**
		 * 
		 * @param	bg_color
		 * @param	bg_alpha
		 * @param	thickness
		 * @param	line_color
		 * @param	line_alpha
		 * @param	_x
		 * @param	_y
		 * @param	_width
		 * @param	_height
		 * @return
		 */
		public static function drawRect(bg_color:Number=0,bg_alpha:Number=0,thickness:Number=0,line_color:Number=0,line_alpha:Number=0,_x:Number=0,_y:Number=0,_width:Number=100,_height:Number=0):Sprite
		{
			var sp:Sprite = new Sprite();
			sp.graphics.beginFill(bg_color, bg_alpha);
			sp.graphics.lineStyle(thickness, line_color, line_alpha);
			sp.graphics.drawRect(_x, _y, _width, _height);
			sp.graphics.endFill();
			return sp;
		}
		
		/**
		 * 
		 * @param	bg_color
		 * @param	bg_alpha
		 * @param	thickness
		 * @param	line_color
		 * @param	line_alpha
		 * @param	_x
		 * @param	_y
		 * @param	_width
		 * @param	_height
		 * @param	_ewidth
		 * @param	_eheight
		 * @return
		 */
		public static function drawRoundRect(bg_color:Number=0,bg_alpha:Number=0,thickness:Number=0,line_color:Number=0,line_alpha:Number=0,_x:Number=0,_y:Number=0,_width:Number=100,_height:Number=0,_ewidth:Number=100,_eheight:Number=100):Sprite
		{
			var sp:Sprite = new Sprite();
			sp.graphics.beginFill(bg_color, bg_alpha);
			sp.graphics.lineStyle(thickness, line_color, line_alpha);
			sp.graphics.drawRoundRect(_x, _y, _width, _height,_ewidth,_eheight);
			sp.graphics.endFill();
			return sp;
		}
		
	}

}